from random import*
a=[]
b=[]
n=0
sm=0
yd=0
ed=0
sd=0
fd=0
r=0
c=0
while len(b)<8:
    n+=1
    b.append(input('请输入第{}个号码'.format(n)))
while r<100000:
    r=r+1
    while len(a)<8:
        a.append(randint(1,33))
    for x in a:
        for y in b:
            if x==y:
                sm+=1
    
    if sm<5:
        c+=1
    elif sm==8:
        print('号码全对：一等奖')
        yd+=1
    elif sm==7:
        print('号码错一个：二等奖')
        ed+=1
    elif sm==6:
        print('号码错二个：三等奖')
        sd+=1
    elif sm==5:
        print('号码错三个：四等奖')
        fd+=1
print('一等奖{}，二等奖{}，三等奖{}，四等奖{}'.format(yd,ed,sd,fd))
print('未中奖{}'.format(c))
